Motor controller and electric power steering device

ABSTRACT

A motor controller that controls a motor including two windings includes a calculator to compute a current instruction value to drive the motor, a first motor driver to supply a first current to one of the windings based on the current instruction value, a second motor driver to supply a second current to the other of the windings based on the current instruction value, a first current detector to detect the first current supplied to the motor from the first motor driver, and a second current detector to detect the second current supplied to the motor from the second motor driver. The calculator supplies a first forced current to the first motor driver, and a second forced current in opposite phase of the first forced current to the second motor driver to determine an abnormality of the first current detector and/or the second current detector.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit of priority to Japanese PatentApplication No. 2018-085451 filed on Apr. 26, 2018. The entire contentsof this application are hereby incorporated herein by reference.

BACKGROUND OF THE DISCLOSURE 1. Field of the Disclosure

The present disclosure relates to a motor controller and an electricpower steering device.

2. Description of the Related Art

An electric power steering device for a vehicle detects a steeringtorque generated in a steering shaft by handle operation and vehiclespeed, and assists the steering force of the handle by driving a motorbased on a detection signal. A controller including a central processingunit (CPU) controls the electric power steering device.

The controller computes the size of a current supplied to the motorbased on a steering torque detected by a torque sensor and vehicle speeddetected by a vehicle speed sensor, and controls the current supplied tothe motor based on the computation result. The controller also acquiresthe actual current flowing through the motor detected by a currentdetector, and performs feedback control, so that the acquired currentcoincides with a target value computed based on the steering torque andthe like.

When a failure occurs in the aforementioned current detector of thecontroller, the current flowing through the motor cannot be detectedaccurately. As a result, by continuing to control the motor with thefaulty current detector, an excessively large motor driving force may besupplied to the motor. Meanwhile, when a necessary current is notsupplied to the motor, sufficient motor driving force cannot be suppliedto the motor in some cases. In these cases, there is a problem that thehandle cannot be assisted with an optimal steering force. Hence, aninitial diagnosis is performed when the controller is activated todetermine whether there is an abnormality in the current detector. Then,motor drive control is started if the current detector is operatingnormally.

A conventional electric power steering device includes a mode in whichabnormality diagnosis of a current detector is performed. In theelectric power steering device, a q-axis current component which is atorque component is set to zero and a d-axis current component which isa magnetic field component is set to a constant value. Hence, the motoris not rotated, and an abnormality of the current detector is detectedfrom a motor current detection value based on the detection result.

However, the conventional electric power steering device has thefollowing problem. That is, when the q-axis current component which isthe torque component is set to zero and the d-axis current componentwhich is the magnetic field component is set to a constant value, eventhough generation of a motor torque can be avoided, the amplitude of thecurrent may not appear, depending on the angle of each phase flowingthrough the motor. In this case, there is a problem that diagnosis ofwhether the current detector is functioning normally cannot be made.

SUMMARY OF THE DISCLOSURE

An example embodiment of the present disclosure is a motor controllerthat controls operation of a motor including two windings. The motorcontroller includes a calculator to compute a current instruction valueto drive the motor, a first motor driver that drives the motor bysupplying a first current to one of the windings based on the currentinstruction value computed by the calculator, a second motor driver thatdrives the motor by supplying a second current to the other of thewindings based on the current instruction value computed by thecalculator, a first current detector to detect the first currentsupplied to the motor from the first motor driver, and a second currentdetector to detect the second current supplied to the motor from thesecond motor driver. To determine an abnormality of at least one of thefirst current detector and the second current detector, the calculatorsupplies a first forced current to the first motor driver, and suppliesa second forced current in opposite phase of the first forced current tothe second motor driver.

The above and other elements, features, steps, characteristics andadvantages of the present disclosure will become more apparent from thefollowing detailed description of example embodiments with reference tothe attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing a schematic configuration of an electricpower steering system.

FIG. 2 is a functional block diagram of an electric power steeringdevice.

FIG. 3 is a diagram for describing diagnostic current instruction valuesused for diagnoses of current detectors.

FIG. 4 is a flowchart showing an example of an operation of the electricpower steering device during diagnoses of the current detectors.

FIG. 5A is a diagram for describing current instruction values used fora first diagnosis.

FIG. 5B is a diagram for describing current instruction values used fora second diagnosis.

DETAILED DESCRIPTION OF THE EXAMPLE EMBODIMENTS

Hereinafter, example embodiments of the present disclosure will bedescribed in detail with reference to the accompanying drawings. Notethat the dimensional ratio in the drawings is expanded for the sake ofsimple description, and may differ from the actual ratio.

FIG. 1 is a diagram showing an example of a schematic configuration ofan electric power steering system 10. The electric power steering system10 is a device that assists a driver's handle operation in a transportmachine such as an automobile. As shown in FIG. 1, the electric powersteering system includes a steering wheel (hereinafter also referred toas “handle”) 12, an electric power steering device 20, a power supplysource 80, and wheels 82.

The electric power steering device 20 has a torque sensor 22, a motorcontroller 30, and a motor 70. The torque sensor 22 is attached to asteering shaft 14. The torque sensor 22 detects a torque applied to thesteering shaft 14 when the steering shaft 14 is rotated by the driver'soperation of the steering wheel 12. A torque signal which is a detectionsignal of the torque sensor 22 is output to the motor controller 30detected by the torque sensor 22.

The motor controller 30 uses electric power obtained from the powersupply source 80 to supply a drive current to the motor 70 based on thetorque signal input from the torque sensor 22, and thereby drives themotor 70. Note that the motor controller 30 can drive the motor 70 usingnot only the torque signal but also other information such as vehiclespeed.

The driving force generated in the motor 70 is transmitted to the wheels82 through a gear box 84. This varies the rudder angle of the wheel 82.Thus, the electric power steering device 20 amplifies the torque of thesteering shaft 14 by the motor 70 and varies the rudder angle of thewheel 82. Accordingly, the driver can operate the steering wheel 12 witha small force.

FIG. 2 is a block diagram showing an example of a configuration of theelectric power steering device 20. As shown in FIG. 2, the electricpower steering device 20 includes the motor controller 30, the motor 70,and a turning angle sensor 76.

The motor controller 30 includes a microcomputer, a drive circuit, andthe like, and is configured of two circuits to drive and control thedouble-winding motor 70. By adopting a dual circuit configuration of aredundant design, even when one circuit fails, the other circuit cancontinue to drive the motor 70, whereby reliability can be improved. Themotor controller 30 includes a first circuit controller 100, firstcircuit inverter 160, and current detector 180 on the first circuitside, a second circuit controller 200, second circuit inverter 260, andcurrent detector 280 on the second circuit side, a diagnosticinstruction value computation portion 300, and an abnormalitydetermination portion 310.

The first circuit controller 100 has a current instruction valuecomputation portion 110, a current limiting value setting portion 120,adders 130, 132, a controller 140, a two phase to three phase converter150, and a three phase to two phase converter 170.

The current instruction value computation portion 110 computes a d-axiscurrent instruction value Id1 which is a magnetic field component and aq-axis current instruction value Iq1 which is a torque component, basedon a steering torque signal Tq supplied from the torque sensor 22 (seeFIG. 1). The computed d-axis current instruction value Id1 and q-axiscurrent instruction value Iq1 are output to the current limiting valuesetting portion 120.

The current limiting value setting portion 120 sets a d-axis currentinstruction value Id1* as an upper limit of the d-axis currentinstruction value Id1 and a q-axis current instruction value Iq1* as anupper limit of the q-axis current instruction value Iq1, based on thed-axis current instruction value Id1 and q-axis current instructionvalue Iq1. The d-axis current instruction value Id1* is output to theadder 130, and the q-axis current instruction value Iq1* is output tothe adder 132.

The three phase to two phase converter 170 performs dq transformation onthree phase currents Iu1, Iv1, Iw1 detected by the current detector 180based on an angle signal θ fed back from the turning angle sensor 76,and obtains a d-axis current value Id1** and a q-axis current valueIq1**. The transformed d-axis current value Id1** is output to the adder130, and q-axis current value Iq1** to the adder 132.

The adder 130 calculates a difference Dd between the d-axis currentinstruction value Id1* from the current limiting value setting portion120 and the d-axis current value Id1** from the three phase to two phaseconverter 170. The calculated difference Dd is output to the controller140. Similarly, the adder 132 calculates a difference Dq between theq-axis current instruction value Iq1* from the current limiting valuesetting portion 120 and the q-axis current value Iq1** from the threephase to two phase converter 170. The calculated difference Dq is outputto the controller 140.

The controller 140 computes voltage instruction values Vd1, Vq1according to proportional plus integral (PI) control computation, forexample, such that the difference Dd from the adder 130 and thedifference Dq from the adder 132 converge to zero. The computed voltageinstruction values Vd1, Vq1 are output to the two phase to three phaseconverter 150.

The two phase to three phase converter 150 performs inverse dqtransformation to transform the two phase voltage instruction valuesVd1, Vq1 into three phase voltage instruction values Vu1, Vv1, Vw1 of au-phase, v-phase, and w-phase, based on an angle signal θ fedback fromthe turning angle sensor 76. The three phase voltage instruction valuesVu1, Vv1, Vw1 obtained by the inverse dq transformation are output tothe first circuit inverter 160.

The first circuit inverter 160 has six bridge-connected switchingelements. Examples of a switching element include a metal-oxidesemiconductor field-effect transistor (MOSFET) and an insulated gatebipolar transistor (IGBT). The first circuit inverter 160 drives theswitching elements based on a PWM signal supplied from an unillustratedPWM generator, to apply the three phase voltage instruction values Vu1,Vv1, Vw1 from the two phase to three phase converter 150 to the motor70. Note that since configurations such as the aforementionedthree-phase inverter circuit are known techniques, detailed descriptionsare omitted.

The current detector 180 detects the three phase currents Iu1, Iv1, Iw1flowing from the first circuit inverter 160 to the phases of the motor70. The detected three phase currents Iu1, Iv1, Iw1 are output to boththe three phase to two phase converter 170 and the abnormalitydetermination portion 310.

The second circuit controller 200 on the second circuit side has acurrent instruction value computation portion 210, a current limitingvalue setting portion 220, adders 230, 232, a controller 240, a twophase to three phase converter 250, and a three phase to two phaseconverter 270. Note that since configurations and functions of thesecond circuit controller 200, second circuit inverter 260, and currentdetector 280 on the second circuit side are the same as theaforementioned first circuit side, detailed descriptions will beomitted.

When the motor controller 30 is activated by turning on an ignition key,for example, in the initial diagnosis, the diagnostic instruction valuecomputation portion 300 executes a diagnostic mode of determiningwhether the current detectors 180, 280 are normal. In the diagnosticmode, the diagnostic instruction value computation portion 300 suppliesa d-axis current instruction value Id1′ and a q-axis current instructionvalue Iq1′ used for performing diagnosis of the current detector 180 onthe first circuit side to the controller 140 of the first circuitcontroller 100. Similarly, the diagnostic instruction value computationportion 300 supplies a d-axis current instruction value Id2′ and aq-axis current instruction value Iq2′ used for performing diagnosis ofthe current detector 280 on the second circuit side to the controller240 of the second circuit controller 200. The diagnostic d-axis currentinstruction value Id1′ and other values are previously stored in anunillustrated memory, for example. Note that the diagnostic currentinstruction values will be described later.

The abnormality determination portion 310 determines whether the currentdetectors 180, 280 are normal or abnormal, based on the three phasecurrents Iu1, Iv1, Iw1 and Iu2, Iv2, Iw2 detected by the currentdetectors 180, 280. In the example embodiment, a total of two diagnosesincluding a first diagnosis and a second diagnosis are performed.

The motor 70 is configured of a three-phase brushless motor, forexample. The motor 70 has two windings 72, 74, and rotates by beingdriven by at least one of the first circuit inverter 160 and the secondcircuit inverter 260.

The turning angle sensor 76 faces the rotation axis of the motor 70. Theturning angle sensor 76 detects the angle signal θ according to a changein angle of the rotation axis of the motor 70. The detected angle signalθ is output to the two phase to three phase converter 150, the threephase to two phase converter 170, the two phase to three phase converter250, and the three phase to two phase converter 270. Note that a knownangle detector such as a resolver or an MR sensor may be used as theturning angle sensor 76, for example.

FIG. 3 is a diagram for describing the current instruction values usedfor diagnoses of the current detector 180 of the first circuit and thecurrent detector 280 of the second circuit. Note that in FIG. 3, thevertical axis represents the d-axis current instruction value, and thehorizontal axis represents the q-axis current instruction value.

As shown in FIG. 3, a forced current I1 including the d-axis currentinstruction value Id1′ and q-axis current instruction value Iq1′ in“d-axis direction +α” is supplied to the first circuit controller 100. Aforced current I2 including the d-axis current instruction value Id2′and q-axis current instruction value Iq2′ in “d-axis direction −α” issupplied to the second circuit controller 200.

The d-axis current instruction value Id1′ for the first circuit and thed-axis current instruction value Id2′ for the second circuit are thesame constant value, and are set to +Y[A], for example. The q-axiscurrent instruction value Iq2′ for the second circuit is set in oppositephase of the q-axis current instruction value Iq1′ for the firstcircuit. Specifically, the q-axis current instruction value Iq1′ for thefirst circuit is set to X[A], and the q-axis current instruction valueIq2′ for the second circuit is set to −X[A].

Thus, in the example embodiment, since the q-axis component is cancelledout by setting the q-axis current instruction value Iq2′ in oppositephase (negative) of the q-axis current instruction value Iq1′, theq-axis current instruction value can be set to zero. Accordingly, in thediagnoses of the current detector 180 and the like, the motor 70 is notrotated, and the forced currents I1, I2 for diagnosis can be supplied totwo different points near the d-axis, so that an abnormality of thecurrent detector 180 and the like can be determined based on thedetection results.

Note that the angle α of the forced currents I1, I2 is preferably setlarger than 0 degrees and not larger than 10 degrees, for example. Thisis because while the q-axis current instruction value Iq1′ for the firstcircuit and the q-axis current instruction value Iq2′ for the secondcircuit are set so as to cancel each other out in the exampleembodiment, variation in the induced voltage constant, resistance, andinductance of the motor 70 may generate a minute torque difference inthe motor 70. Hence, by setting a small angle α, even when a motortorque as the q-axis component occurs, the motor torque can be kept assmall as possible. Note that information for correcting the torquedifference may be pre-stored in a nonvolatile memory or the like, andthe torque difference may be suppressed by reading out and using thecorrection information.

FIG. 4 is a flowchart showing an example of an operation of the motorcontroller 30 during the diagnostic mode of diagnosing whether there isan abnormality in the current detector 180 on the first circuit side andin the current detector 280 on the second circuit side. Note that thedescription will be given of an example where the first diagnosis ismade and then the second diagnosis is made in the diagnostic mode. FIG.5A is a diagram for describing the current instruction values used inthe first diagnosis, and FIG. 5B is a diagram for describing the currentinstruction values used in the second diagnosis.

As shown in FIG. 4, in step S10, immediately after the ignition key isturned on, the diagnostic instruction value computation portion 300determines whether a condition for executing the diagnostic mode is met.Examples of the condition for executing the diagnostic mode includeturning on a power relay, turning on a motor relay, and whether arotation speed of the motor has dropped to a predetermined speed orlower. Next, the operation proceeds to step S20.

In step S20, the diagnostic instruction value computation portion 300switches to the diagnostic current instruction value used in the firstdiagnosis. As shown in FIG. 5A, the diagnostic instruction valuecomputation portion 300 switches to a forced current I1_P1 in “d-axisdirection +α” for the first circuit, and switches to a forced currentI2_P1 in “d-axis direction −α” for the second circuit. A d-axis currentinstruction value Id1′_P1 and a q-axis current instruction value Iq1′_P1are included in the forced current I1_P1, while a d-axis currentinstruction value Id2′_P1 and a q-axis current instruction value Iq2′_P1are included in the forced current I2_P1.

Note that as described with reference to FIG. 3, the q-axis currentinstruction value Iq1′_P1 for the first circuit and the q-axis currentinstruction value Iq2′_P1 for the second circuit are set opposite inphase. The forced current I1_P1 and forced current I2_P1 for diagnosis(hereinafter also referred to as forced current I1_P1 and the like) areset to 40 A, for example, and are controlled so as to gradually approachthe target 40 A from the start of the diagnosis. This is because unlessthe forced current I1_P1 and the like are set large enough to havetolerance for noise, variation in the detected current due to noise maycause erroneous detection of the forced current I1_P1 and the like, ormay disable detection. Note that the values of the forced current I1_P1and the like for diagnosis are not limited to 40 A, as long as they arevalues that can avoid erroneous detection. Next, the operation proceedsto step S30.

In step S30, the diagnostic instruction value computation portion 300performs the first diagnosis. The diagnostic instruction valuecomputation portion 300 outputs the d-axis current instruction valueId1′_P1 and the q-axis current instruction value Iq1′_P1 to thecontroller 140 of the first circuit controller 100, and also outputs thed-axis current instruction value Id2′_P1 and the q-axis currentinstruction value Iq2′_P1 to the controller 240 of the second circuitcontroller 200. Next, the operation proceeds to step S40.

In step S40, the abnormality determination portion 310 acquires currentsIu1_P1, Iv1_P1, Iw1_P1 detected by the current detector 180 byperforming the first diagnosis, and determines whether there is anabnormality in the current detector 180 on the first circuit side basedon the following conditions (1), (2).|current Iu1_P1|+|current Iv1_P1|+|current Iw1_P1|≥20 A  (1)current Iu1_P1+current Iv1_P1+current Iw1_P1≤10 A  (2)

The abnormality determination portion 310 computes the sum of absolutevalues of the currents Iu1_P1, Iv1_P1, Iw1_P1 in “d-axis direction +α”flowing through the phases of the motor 70 detected by the currentdetector 180, and determines that the current detector 180 on the firstcircuit side is normal when the computation result is not smaller thanthe threshold 20 A. Note that the threshold is not limited to 20 A.Since a determination similar to condition (1) can be made with theother condition (2) and later-mentioned conditions (3) to (6), (10),(11), for example, detailed descriptions will be omitted.

Also, in the first diagnosis, the abnormality determination portion 310acquires currents Iu2_P1, Iv2_P1, Iw2_P1 detected by the currentdetector 280 by performing the first diagnosis, and determines whetherthere is an abnormality in the current detector 280 on the secondcircuit side based on the following conditions (3), (4).|current Iu2_P1|+|current Iv2_P1|+|current Iw2_P1|≥20 A  (3)current Iu2_P1+current Iv2_P1+current Iw2_P1≤10A  (4)

When any one of conditions (1) to (4) is not met, the abnormalitydetermination portion 310 determines that at least one of the currentdetector 180 of the first circuit and the current detector 280 of thesecond circuit is abnormal. For example, the abnormality determinationportion 310 determines that the current detector 180 is abnormal whenconditions (1), (2) are not met after passage of several hundredmilliseconds from the start of the diagnosis, and determines that thecurrent detector 280 is abnormal when conditions (3), (4) are not metafter passage of several hundred milliseconds from the start of thediagnosis. When it is determined that the current detector 180 or thecurrent detector 280 is abnormal, the operation proceeds to step S90.

In step S90, when it is determined that the current detector 180 of thefirst circuit is abnormal, the abnormality determination portion 310gives a warning to prohibit use of the first circuit inverter 160.Similarly, when it is determined that the current detector 280 of thesecond circuit is abnormal, the abnormality determination portion 310gives a warning to prohibit use of the second circuit inverter 260. Thewarning is given by lighting an LED or the like, or displaying contentsof the warning on a display portion, for example. The abnormalitydetermination portion 310 also instructs the diagnostic instructionvalue computation portion 300 to stop output of the forced current I1_P1and the like for diagnosis.

Meanwhile, when it is determined in step S40 that all of conditions (1)to (4) of the first diagnosis are met, the abnormality determinationportion 310 proceeds to step S50 to perform the second diagnosis afterthe first diagnosis.

In step S50, the diagnostic instruction value computation portion 300switches to the diagnostic current instruction value used in the seconddiagnosis. As shown in FIG. 5B, the diagnostic instruction valuecomputation portion 300 switches to a forced current I1_P2 in “d-axisdirection −α” for the first circuit, and switches to a forced currentI2_P2 in “d-axis direction +a” for the second circuit. A d-axis currentinstruction value Id1′_P2 and a q-axis current instruction value Iq1′_P2are included in the forced current I1_P2, while a d-axis currentinstruction value Id2′_P2 and a q-axis current instruction value Iq2′_P2are included in the forced current I2_P2. Next, the operation proceedsto step S60.

In step S60, the diagnostic instruction value computation portion 300performs the second diagnosis. The diagnostic instruction valuecomputation portion 300 outputs the d-axis current instruction valueId1′_P2 and the q-axis current instruction value Iq1′_P2 to thecontroller 140 of the first circuit controller 100, and also outputs thed-axis current instruction value Id2′_P2 and the q-axis currentinstruction value Iq2′_P2 to the controller 240 of the second circuitcontroller 200. Next, the operation proceeds to step S70.

In step S70, the abnormality determination portion 310 acquires currentsIu1_P2, Iv1_P2, Iw1_P2 detected by the current detector 180 byperforming the second diagnosis, and determines whether there is anabnormality in the current detector 180 based on the followingconditions (5) to (9).|current Iu1_P2|+|current Iv1_P2|+|current Iw1_P2|≥20 A  (5)current Iu1_P2+current Iv1_P2+current Iw1_P2≤10A  (6)|current Iu1_P1|+|current Iu1_P2|≥5A  (7)|current Iv1_P1|+|current Iv1_P2|≥5 A  (8)|current Iw1_P1|+|current Iw1_P2|≥5 A  (9)

For example, in conditions (7) to (9), a value that can satisfy thetotal of two current amplitudes at the time of the first diagnosis andthe second diagnosis when “d-axis direction ±a (α=10 degrees),” and thatdoes not cause erroneous detection is set as a threshold.

Accordingly, the abnormality determination portion 310 adds the absolutevalue of the amplitude of the current Iu1_P1 in “d-axis direction +α” ofthe u-phase at the time of the first diagnosis and the absolute value ofthe amplitude of the current Iu1_P2 in “d-axis direction −α” of theu-phase at the time of the second diagnosis, and determines whether theadded value is not smaller than 5 A as the threshold. Although thethreshold is set to be not smaller than 5 A for tolerance in the exampleembodiment, the value is not limited thereto. Thus, by using the currentamplitude of two different (opposite-phase) points at the time of thefirst diagnosis and the second diagnosis, detection of the currentamplitude at a zero-crossing can be surely avoided. Note that since adetermination similar to condition (7) can be made with the otherconditions (8), (9) and later-mentioned conditions (12) to (14), forexample, detailed descriptions will be omitted.

Also, in the second diagnosis, the abnormality determination portion 310acquires currents Iu2_P2, Iv2_P2, Iw2_P2 detected by the currentdetector 280 by performing the second diagnosis, and determines whetherthere is an abnormality in the current detector 280 according to thefollowing conditions (10) to (14) based on the result of the seconddiagnosis.|current Iu2_P2|+|current Iv2_P2|+|current Iw2_P2|≥20 A  (10)current Iu2_P2+current Iv2_P2+current Iw2_P2≤10 A  (11)|current Iu2_P1|+|current Iu2_P2|≥5 A  (12)|current Iv2_P1|+|current Iv2_P2|≥5 A  (13)|current Iw2_P1|+|current Iw2_P2|≥5 A  (14)

In step S70, when any one of conditions (5) to (14) is not met, theabnormality determination portion 310 determines that at least one ofthe current detector 180 of the first circuit and the current detector280 of the second circuit is abnormal. For example, the abnormalitydetermination portion 310 determines that the current detector 180 isabnormal when conditions (5) to (9) are not met after passage of severalhundred milliseconds from the start of the diagnosis, and determinesthat the current detector 280 is abnormal when conditions (10) to (14)are not met after passage of several hundred milliseconds from the startof the diagnosis. When it is determined that the current detector 180 orthe current detector 280 is abnormal, the operation proceeds to stepS90.

In step S90, when it is determined that the current detector 180 or thecurrent detector 280 is abnormal, the abnormality determination portion310 gives a warning to prohibit use of at least one of the first circuitinverter 160 and the second circuit inverter 260, as mentioned earlier.

Meanwhile, in step S70, all of conditions (5) to (14) of the seconddiagnosis are met, the abnormality determination portion 310 determinesthat both the current detector 180 of the first circuit and the currentdetector 280 of the second circuit are normal, and proceeds to step S80.

In step S80, the abnormality determination portion 310 instructs thediagnostic instruction value computation portion 300 to stop output ofthe forced current I1_P2 and the like for diagnosis, to shift to thenormal operation control mode. The diagnostic instruction valuecomputation portion 300 switches to the d-axis and q-axis currentinstruction values from the current limiting value setting portions 120,220, and executes the normal operation control mode.

As has been described, according to the example embodiment, in order todiagnose whether an abnormality occurs in the current detector 180 ofthe first circuit and the current detector 280 of the second circuit,the forced currents I1, I2 for diagnosis are supplied to two differentpoints of the motor 70 having two windings 72, 74, the points includingopposite-phase q-axis components and located near the d-axis. Thus,since generation of a motor torque can be cancelled out, rotation of themotor 70 is prevented, and the phase currents Iu1, Iv1, Iw1 and Iu2,Iv2, Iw2 flowing through the motor 70 can be detected.

According to the example embodiment, the second diagnosis is performedin addition to the first diagnosis. In the second diagnosis, thediagnosis is performed by comparing the total of the amplitude ofcurrents in each phase of the motor 70 detected in the first diagnosisand the second diagnosis with a design value thereof. Hence, even at anangle where the current amplitude of a specific phase is OA(zero-crossing), it is possible to surely detect that the currentdetection value is not fixed to OA. This can improve accuracy ofdiagnosis for determining an abnormality of the current detector 180 ofthe first circuit and the current detector 280 of the second circuit.

According to the example embodiment, since a failure in the currentdetector 180 of the first circuit and the current detector 280 of thesecond circuit can be determined by the abnormality determinationportion 310, it is possible to prevent the problem of continuing controlwith the failure and supplying an excessively large motor driving forceto the motor 70. Moreover, operation of the motor 70 on the faultycurrent detector 180 side, for example, may be stopped, and theoperation of the motor 70 on the normal current detector 280 side, forexample, can be used to cover the motor driving force. Hence, asufficient motor driving force can be maintained. This can improvereliability of the motor controller 30.

Note that the technical scope of the present disclosure is not limitedto the above example embodiment, and includes various modifications ofthe above example embodiment without departing from the gist of thedisclosure. Although the current instruction value computation portions110, 210 are provided for the respective circuits in the exampleembodiment, the disclosure is not limited to this. For example, thecurrent instruction value computation portions 110, 210 may beconfigured of a single current instruction value computation portionthat outputs a current instruction value to each of the current limitingvalue setting portions 120, 220 of the corresponding circuit.

Although the diagnostic instruction value computation portion 300 isprovided as a separate part for outputting a current instruction valueused for diagnosis of the current detectors 180, 280 in the exampleembodiment, the disclosure is not limited to this. For example, insteadof providing the diagnostic instruction value computation portion 300,the current instruction value computation portions 110, 210 of eachcircuit may have a function of outputting a diagnostic currentinstruction value. Furthermore, the current instruction valuecomputation portions 110, 210 may be configured of a single currentinstruction value computation portion, and the current instruction valuecomputation portion may have a function of outputting a diagnosticcurrent instruction value.

Features of the above-described example embodiments and themodifications thereof may be combined appropriately as long as noconflict arises.

While example embodiments of the present disclosure have been describedabove, it is to be understood that variations and modifications will beapparent to those skilled in the art without departing from the scopeand spirit of the present disclosure. The scope of the presentdisclosure, therefore, is to be determined solely by the followingclaims.

What is claimed is:
 1. A motor controller that controls operation of amotor including two windings, the motor controller comprising: acalculator to compute a current instruction value to drive the motor; afirst motor driver to drive the motor by supplying a first current toone of the two windings based on the current instruction value computedby the calculator; a second motor driver to drive the motor by supplyinga second current to another of the two windings based on the currentinstruction value computed by the calculator; a first current detectorto detect the first current supplied to the motor from the first motordriver; and a second current detector to detect the second currentsupplied to the motor from the second motor driver; wherein an initialdiagnosis is performed when the motor controller is activated, todetermine an abnormality of at least one of the first current detectorand the second current detector, the calculator supplies a first forcedcurrent to the first motor driver, and supplies a second forced currentin opposite phase of the first forced current to the second motordriver, the calculator supplies a third forced current in opposite phaseof the first forced current to the first motor driver, and supplies afourth forced current in opposite phase of the third forced current tothe second motor driver, and the motor controller further includes anabnormality determiner to determine an abnormality of at least one ofthe first current detector and the second current detector, based on:the first forced current in each phase of the motor detected by thefirst current detector, the second forced current in each phase of themotor detected by the second current detector, the third forced currentin each phase of the motor detected by the second current detector, andthe fourth forced current in each phase of the motor detected by thesecond current detector.
 2. The motor controller according to claim 1,wherein the first forced current includes a first d-axis currentinstruction value and a first q-axis current instruction value; thesecond forced current includes a second d-axis current instruction valueand a second q-axis current instruction value; and the second q-axiscurrent instruction value of the second forced current is in oppositephase of the first q-axis current instruction value of the first forcedcurrent.
 3. The motor controller according to claim 2, wherein theabnormality determiner performs addition using at least one of the firstforced current and the second forced current.
 4. An electric powersteering device that assists a handle operation by a driver, theelectric power steering device comprising: a torque sensor to detect atorque generated by the handle operation; the motor controller accordingto claim 3; and the motor driven by the motor controller.
 5. An electricpower steering device that assists a handle operation by a driver, theelectric power steering device comprising: a torque sensor to detect atorque generated by the handle operation; the motor controller accordingto claim 2; and the motor driven by the motor controller.
 6. The motorcontroller according to claim 2, wherein an angle α of the first forcedcurrent and the second forced current is set to a value that is largerthan zero degrees and about 10 degrees or less.
 7. The motor controlleraccording to claim 1, wherein the abnormality determiner performsaddition using at least one of the first forced current and the secondforced current.
 8. An electric power steering device that assists ahandle operation by a driver, the electric power steering devicecomprising: a torque sensor to detect a torque generated by the handleoperation; the motor controller according to claim 7; and the motordriven by the motor controller.
 9. An electric power steering devicethat assists a handle operation by a driver, the electric power steeringdevice comprising: a torque sensor to detect a torque generated by thehandle operation; the motor controller according to claim 1; and themotor driven by the motor controller.